package Thread;

/**
 * wait
 */

public class Demo24 {
    public static void main(String[] args) throws InterruptedException {
        Object obj = new Object();
        System.out.println("wait之前");
        synchronized (obj){//wait必须要用notify唤醒
            obj.wait();
        }
        System.out.println("wait之后");
    }
}
